<script setup lang="ts">
  import { ref } from 'vue'
  import { CodeEditor } from '@data-center/code-editor'

  const editorRef = ref()
  const ideContent = ref('select * from table;')

  const onSelectionChange = (e: any) => console.log('onSelectionChange: ', e)
</script>

<template>
  <div class="editor">
    <CodeEditor
      ref="editorRef"
      v-model:value="ideContent"
      @selection-change="onSelectionChange"
      language="sql"
      theme='vs-dark'
    />
  </div>
</template>
